﻿<!-- #include file="mymin.asp" -->
<title>添加会员</title></head><body><div class='main400'>
<%

dim id,rs,name,pass,count
If getData("a")<>"1" Then
	w "添加会员:<br/><form action=""addmember.asp?sid="&sid&"&a=1"" method=""post"">名字<input name=""name"" maxlength=""16""/><br/>"&_
		"密码<input name=""pass"" maxlength=""16""/><br/><input type=""submit"" value=""提交""/></form>"
Else
	name=getD("name","")
	pass=getD("pass","")
	if name="" or pass="" then Call error2("用户或密码不能为空")
	count=myconn.execute("select count(id) from 74hu_user where name='"&name&"'")(0)
	if count>0 Then Call error2("用户名已存在!")
	Err.Clear
	myconn.execute("insert into 74hu_user ([name],[password],[sid],[hu_level],[money],[regtime],[sex],[topic],[reply])values('"&name&"','"&pass&"','',0,0,'"&time_now&"',0,0,0)")
	If Err.Number=0 Then
		w "添加成功"
	Else
		w "添加失败"
	End If
End If
w "<br/>----------<br/><a href=""member.asp?sid="&sid&"&amp;"">[会员总管]</a>"

call bbsLast
%>